const state = {
  drawer: false,
  isFixedHeader: true
}

const mutations = {
  SET_DRAWER: (state, val) => {
    state.drawer = val
  },
  SET_SWITCH: state => {
    state.isFixedHeader = !state.isFixedHeader
  }
}

const actions = {
  changeDrawer({ commit }, val) {
    console.log(val)
    commit('SET_DRAWER', val)
  },
  changeSwitch({ commit }) {
    commit('SET_SWITCH')
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
